using System;
using System.Collections.Generic;
using System.Text;
using Mpi.Common.Collections;

namespace Xeml.Document
{
    public class ObservationCollection : ObservableIdCollectionBase<Observation,int>
    {

        private ObservationPoint _obsPoint;
        public ObservationPoint ObservationPoint
        {
            get
            {
                return _obsPoint;
            }
        }

        public ObservationCollection(ObservationPoint owner)
        {
            _obsPoint = owner;
        }

        protected override int GetIdentifiere(Observation item)
        {
            return item.Id;
        }

        protected override void SetOwner(Observation item)
        {
            item.Collection = this;
        }

        protected override void RemoveOwner(Observation item)
        {
            item.Collection = null;
        }
    }
}
